import pandas as pd

data_path = 'all.csv'

df = pd.read_csv(data_path)
no_sure_df = df[df['label']=="有疑问"]
no_sure_df = no_sure_df.sample(frac=1)
#no_sure_df.to_excel("no_sure.xlsx")
#no_sure_df.to_csv("no_sure.csv")
no_sure_df = no_sure_df.rename(columns={"data":"text"})
no_sure_df.to_json("no_sure.json",orient = "records")
print(no_sure_df)